package com.xianggu.demo.service.impl;

import com.xianggu.demo.dto.UserDto;
import com.xianggu.demo.mapper.UserMapper;
import com.xianggu.demo.service.BookService;
import com.xianggu.spring.annotation.AutoWired;
import com.xianggu.spring.annotation.PostConstruct;
import com.xianggu.spring.annotation.Service;

/**
 * @author chengjy
 * @date 2025/2/28
 */
@Service("bookService")
public class BookServiceImpl implements BookService {

    @AutoWired
    private UserMapper userMapper;

    @Override
    public void test() {
        System.out.println(this);
    }

    @Override
    public UserDto getById(String id) {
        return userMapper.getById(id);
    }

    @PostConstruct
    public void init(){
        System.out.println(" bookService 数据初始化");
    }
}
